<script>
  const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  console.log(arr.slice(1, 3))// [1,2]
  console.log(arr) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],原始元素不变 slice[index,end-1]获取元素

  const arr2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  console.log(arr2.splice(1, 3)) // [2,3,4]
  console.log(arr2) // [1,5,6,7,8,9,10]，原始元素变化 splice(index,deleteCount,items),可以增加元素，删除元素，替换元素

  const arr3 = '123456789'
  console.log(arr3.split("",3)) // ["1", "2", "3"]
  console.log(arr3) // [1,2,3,4,5,6,7,8,9] split(separator,limit)
</script>